<template>
    <div>
        <div style="line-height: 0.6rem; font-size: 0.3rem; color: gainsboro;">
            <p>热门搜索</p>
            <div style="display: flex;">
                <div v-for="(item) in search" :key="item.keyword" style="padding: 0.2rem; background-color: #F6F6F6; text-align: center; width: 2rem;">{{item.keyword}}</div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            search: {},
        };
    },
    created() {
        this.getSearch();
    },
    methods: {
        async getSearch() {
            let data = await this.$API.SearchAPI.GetSearch();
            // console.log(data);
            this.search = data.data.list;
            // console.log(this.search);
        },
    },
};
</script>

<style>
</style>